proc unban {nick handle chan otbn1 host} {
global botnick home bcast
if {$otbn1 == ""} {
  putserv "NOTICE $nick :ERROR - Invalid Syntax - Should Be - (/msg) $botnick unban (#channel) <mask>"
  return 0
  }
if {![botisop $chan]} {
  putserv "NOTICE $nick :ERROR - Bot dosen't have op status (+o) on $chan"
  return 0
  }
if {[isban $otbn1]} {
if {[matchattr $handle o]} {
  putlog "!$nick ($host)! unban $otbn1"
  killban $otbn1
  putserv "NOTICE $nick :Removed ban from channel partition."
if {$bcast == "1"} {
  putserv "PRIVMSG $home :Calling for unban request for \002$otbn1\002 (Requested By: \002$nick\002 ($host))"
  }  
  return 0
  } else {
  putserv "NOTICE $nick :Unable To Execute Command - Not Enough Permissions - Permission Denied."
  return 0
  } 
  }
if {[isban $otbn1 $chan]} {
  putlog "!$nick ($host)! unban $chan $otbn1"
  killchanban $chan $otbn1
  putserv "NOTICE $nick :Removed ban \002$otbn1\002 from channel record '$chan'"
if {$bcast == "1"} {
  putserv "PRIVMSG $home :Calling for unban request for \002$otbn1\002 in $chan (Requested By: \002$nick\002 ($host))"
  }
  return 0
  }
if {[ischanban $otbn1 $chan]} {
  putlog "!$nick ($host)! unban $chan $otbn1"
  putserv "MODE $chan -b $otbn1"
  putserv "NOTICE $nick :Removed ban \002$otbn1\002 from channel record '$chan'"
if {$bcast == "1"} {
  putserv "PRIVMSG $home :Calling for unban request for \002$otbn1\002 in $chan (Requested By: \002$nick\002 ($host))"
  }
  return 0
  }
  putserv "NOTICE $nick :ERROR - Could not find ban - \002$otbn1\002 could not be found in the channel partitions ban sector."
  }


